import request from '@/utils/request'

export function getRole(query) {
  return request({
    url: '/role/index',
    method: 'get',
    params: query
  })
}

export function addRole(query) {
  return request({
    url: '/role/save',
    method: 'post',
    params: query
  })
}

export function updateRole(query) {
  return request({
    url: `/role/edit`,
    method: 'post',
    params: query
  })
}

export function deleteRole(query) {
  return request({
    url: `/role/delete`,
    method: 'post',
    params: query
  })
}
